Bariatric surgery is a powerful tool for producing significant and durable weight loss. Yet, not all patients achieve initial weight loss success and many patients have weight regain as early as 1-2 years post-surgery. Suboptimal weight loss patterns not fully explained by surgical, demographic, and medical factors has led to greater emphasis on patient behaviors evidenced by clinical guidelines that focus on appropriate eating and physical activity. However, research to inform such guidelines typically has relied on imprecise measures or not been specific to bariatric surgery. There is also little understanding of mechanisms by which psychosocial factors influence outcomes. Thus, there is a need to: (a) measure behaviors and psychosocial factors thought to be related to surgical outcomes (particularly those emphasized in guidelines) using innovative strategies to maximize data quality, (b) determine which behaviors and psychosocial factors are related to outcomes, and (c) explore how psychosocial factors influence weight both directly and via influences on behavior. Our research team was the first to employ innovative mobile health (mHealth) technology within an Ecological Momentary Assessment (EMA) framework to measure adherence to recommended behaviors at 6 months post-surgery. We propose to build on this work by using EMA to measure behavioral, psychosocial, and environmental factors over a much longer period to understand how they predict success and risk at key post-surgical weight loss phases-i.e. active weight loss (0-1 yrs), weight stabilization (1-2 yrs), and initial maintenance (2-3 yrs). An NIH-funded multi-sensor PiLR HEALTH platform will integrate objective sensor data measuring behaviors and the environments in which they are performed with self-report information collected via smartphone in real-time and in patients' natural environment. Participants (N=200) recruited from 2 ASMBS-designated centers of excellence will complete a 12-day EMA protocol pre-surgery and at 3, 6, 12, 18, 24, 30 months post-surgery to assess recommended behaviors [e.g., meal frequency, PA], psychosocial indicators with the most prior evidence of an association with surgical outcomes (e.g., mood/depression), and key environmental factors (e.g., type/quality of the food environment). Participants will also be weighed at the above time points and 36 months. Along with describing patterns in behaviors and their relation to weight loss, we will test causal models to understand how complex systems of behavioral, psychosocial, and environmental factors affect weight loss, and to identify optimal targets for intervention. This project has the potential to build a much more sophisticated and valid understanding of who is and is not successful after bariatric surgery and why. This new understanding will directly contribute to improved (i.e., specific, consistent, and validated) guidelines for recommended pre and postoperative behaviors, which could lead to improved surgical outcomes. The enhanced understanding will also inform behavioral, psychosocial, and environmental targets for intervention that are mostly likely to improve surgical outcomes.